Skip to content

[Stack Monitoring] add loading state to nodes table#114709

Merged
neptunian merged 2 commits intoelastic:masterfrom
neptunian:114162-fix-flakey-table-sort-functional-test
Oct 13, 2021
Merged

[Stack Monitoring] add loading state to nodes table#114709
neptunian merged 2 commits intoelastic:masterfrom
neptunian:114162-fix-flakey-table-sort-functional-test

Conversation

@neptunian
Copy link
Contributor

@neptunian neptunian commented Oct 12, 2021

In a previous PR, I removed the loading state from the angular version and didn't add one to the react version. This causes there to be no loading indicator when fetches are happening in the nodes listing table during table changes, and I believe it also causes the tests to be flakey that are waiting for the loading indicator to not exist. Since it never exists to begin with I think it finishes too early and causes a race condition when clicking a column to sort twice (see error). I think it could be the cause of this test failing sometimes.

Test

  • In both Angular and React mode, when sorting or querying in the Nodes Listing table, there should be a loading indicator while the fetch is happening

@neptunian neptunian added v8.0.0 Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services release_note:skip Skip the PR/issue when compiling release notes v7.16.0 Epic: Stack Monitoring de-angularization labels Oct 12, 2021
@neptunian neptunian self-assigned this Oct 12, 2021
@neptunian neptunian requested a review from a team as a code owner October 12, 2021 18:50
@neptunian neptunian requested review from a team October 12, 2021 18:50
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)


async clickNameCol() {
await find.clickByCssSelector(`[data-test-subj="${SUBJ_TABLE_SORT_NAME_COL}"] > button`);
await find.byCssSelector('.euiBasicTable-loading');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just added this to make sure the indicator exists first

pagination={pagination}
onChange={onChange}
columns={columns}
loading={props.isLoading || isLoading}
Copy link
Contributor Author

@neptunian neptunian Oct 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if props.isLoading (react version) else isLoading (angular). this is because we make the fetch higher up now and need to pass the state down in the react version.

@neptunian
Copy link
Contributor Author

@elasticmachine merge upstream

@neptunian
Copy link
Contributor Author

neptunian commented Oct 12, 2021

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
monitoring 1.1MB 1.1MB +313.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @neptunian

@neptunian neptunian added the auto-backport Deprecated - use backport:version if exact versions are needed label Oct 13, 2021
@neptunian neptunian merged commit c3b9e81 into elastic:master Oct 13, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Oct 13, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Oct 13, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Sandra G <neptunian@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.16.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants